package com.axxc.jpa.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.axxc.jpa.entity.StudentEntity;

/**
 * 
 * @ClassName: PresonRepository
 * @Description: 该注解可以替换声明为Repository
 * @author 熊小川
 * @date 2018年4月9日 下午9:36:53
 */
// @RepositoryDefinition(domainClass = Person.class, idClass = Long.class)
public interface IStudentRepository extends JpaRepository<StudentEntity, Long> {
	
	//where name like ?%
	List<StudentEntity> findByNameStartingWith(String name);
	
	//where age >?1 and name like ?%
	List<StudentEntity> readByAgeGreaterThanAndNameStartingWith(Integer age,String name);
	
	
}
